﻿<inter:PluginConfigForm x:Class="Convertor.Plugin.SelectDirectory.ConfigForm"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:inter="clr-namespace:Convertor.Interface;assembly=Convertor.Interface"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignWidth="300" Loaded="UserControl_Loaded">
    <inter:PluginConfigForm.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Convertor;component\Assets\Style.xaml"/>
                <ResourceDictionary Source="Assets\Lang\StringResource.zh.xaml"/>
                <ResourceDictionary Source="Assets\Lang\StringResource.en.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </inter:PluginConfigForm.Resources>
    <DockPanel MinWidth="300" MaxWidth="600" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type inter:PluginConfigForm}}, Path=Config}">
        <DockPanel LastChildFill="True" DockPanel.Dock="Top">
            <Button Content="{DynamicResource Plugin_SelectDirectory_Clear}" Click="Button_Click_Clear" DockPanel.Dock="Right"/>
            <Button Content="{DynamicResource Plugin_SelectDirectory_SelectPath}" Click="Button_Click_Select"  DockPanel.Dock="Right"/>
            <TextBlock Name="tbFilePath" Padding="7" DockPanel.Dock="Left"
                       Text="{Binding Path=SaveFilePath, UpdateSourceTrigger=PropertyChanged}"/>
        </DockPanel>
        <TextBlock Style="{StaticResource InfoStyle}" DockPanel.Dock="Top" Text="{Binding Path=ToolTip}"/>
    </DockPanel>
</inter:PluginConfigForm>
